//
//  LYTestGuideViewController.m
//  artist
//
//  Created by Jay_Apple on 16/5/5.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import "LYTestGuideViewController.h"
#import "LYGuideListViewController.h"
#import "LYArticleModel.h"

@interface LYTestGuideViewController ()

@end

@implementation LYTestGuideViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self getGuides];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/**
 *  获取圈子
 */
- (void)getGuides{
    
    [LYRequestTool getCategorylistWithPid:@"1" success:^(NSArray<LYArticleModel *> *models) {
        
        NSMutableArray *guideVCs = [NSMutableArray array];
        
        for (LYArticleModel *model in models) {
            
            LYGuideListViewController *guide = [[LYGuideListViewController alloc] init];
            guide.title = model.title;
            guide.model = model;
            [guideVCs addObject:guide];
            
        }
        
        self.childVCs = guideVCs;

        
    } failure:^(NSString *code, NSString *message) {
        
    }];
}


@end
